package com.mrdeer.web.service.sys;

import com.mrdeer.common.base.BaseService;
import com.mrdeer.common.entity.dto.DepartmentHeaderDTO;
import com.mrdeer.common.entity.dto.UserDTO;
import com.mrdeer.common.entity.sys.DepartmentHeader;

import java.util.List;

public interface SysDepartmentHeaderService extends BaseService<DepartmentHeader, DepartmentHeaderDTO> {

    /**
     * 通过部门和负责人类型获取
     *
     * @param departmentId
     * @param type
     * @return
     */
    List<UserDTO> findHeaderByDepartmentId(String departmentId, Integer type);

    /**
     * 通过部门获取
     *
     * @param departmentIds
     * @return
     */
    List<DepartmentHeader> findByDepartmentIdIn(List<String> departmentIds);

    /**
     * 通过部门id删除
     *
     * @param departmentId
     */
    void deleteByDepartmentId(String departmentId);

    /**
     * 通过userId删除
     *
     * @param userId
     */
    void deleteByUserId(String userId);
}
